---
title: "Master / Detail - Other"
enterprise: true
---

Here we discuss areas of Master / Detail that don't quite fit within the other sections of the documentation.

## Syncing Detail Scrolling with Master

By default, the Detail Grid takes up the width of the Master Grid and does not move when the Master Grid's columns are horizontally scrolled. This is because the Detail Grid is not sitting with the other Master Grid's cells, rather it is in a separate container that overlays the Master Grid's cells and takes up the full width of the grid ignoring all the Master Grid's columns.

The underlying feature of the grid that allows the Detail Grid to span the width of the Master Grid is called [Full Width Row](./full-width-rows/).

It is possible to have the Detail Grid sit within the same container as the Master Grid's cells and hence move with the Master Grid's horizontal scrolling. This is achieved by [Embedding the Full Width Row](./full-width-rows/#embedded-full-width-rows) and is set via the grid property `embedFullWidthRows=true` for the Master Grid. This tells the grid to layout (embed) the Detail Panel with the other rows.

In the example below, notice that horizontal scrolling is combined for both Master Grid and Detail Grid using the Embed Full Width Rows feature.

{% gridExampleRunner title="Detail scrolls with Master" name="detail-scrolls-with-master"  exampleHeight=525 /%}

If you are mixing Embed Full Width Rows and [Custom Detail](./master-detail-custom-detail/), then be aware the Detail Panel will get rendered three times as follows:

* Pinned Left Columns
* Pinned Right Columns
* Pinned Centre Columns

This is because the Columns, and thus the Detail Panel, are appearing in three separate scrollable sections. The example below demonstrates this. Note the custom Detail Panel appears in all three sections.

{% gridExampleRunner title="Embed Custom Detail" name="embed-custom-detail" /%}

If you want your custom Detail Panel to only show content in one section, have logic that inspects the components `params.pinned` property and renders content relevant for the section.

## Filtering and Sorting

There are no specific configurations for filtering and sorting with Master / Detail but as there are multiple grids each grid will filter and sort independently.

Below shows a simple Master / Detail setup which has filtering and sorting enabled in both master and detail grids.

{% gridExampleRunner title="Filtering with Sort" name="filtering-with-sort"  exampleHeight=550 /%}

## Grouping

The Master / Detail is supported with [Row Grouping](./grouping/).
Only leaf nodes can be master rows.

{% gridExampleRunner title="Grouping with Master Detail" name="grouping-master-detail"  exampleHeight=550 /%}

## Tree Data

The Master / Detail is supported with [Tree Data](./tree-data/).
Both leaf nodes and groups can be master rows. If a group is also a master row, the detail grid will be shown before its children.

{% note %}
Master / Detail will by default show detail grids for every row, including groups.
To show detail grids for leaf nodes only, provide the `isRowMaster` callback and return `true` for leaf nodes only.

When using [Tree Data Paths](.//tree-data-paths), filler groups cannot be master rows and `isRowMaster` will not be called.
{% /note %}

{% gridExampleRunner title="Tree Data with Master Detail" name="tree-data-master-detail"  exampleHeight=550 /%}

## Layouts

It is not possible to mix [DOM layout](./grid-size/#dom-layout) for master detail. This is because the layout is a CSS setting that would be inherited by all grids contained with the master grid. So if your master grid was 'for-print', then all child grids would pick up the 'for-print' layout.

When using Master / Detail and [for-print](./printing/), then all detail grids need to use for-print.

When using Master / Detail and [auto-height](./grid-size/#auto-height-layout), then all detail grids need to use auto-height.

## Cell Selection

When [Cell Selection](./cell-selection/) is enabled on the Master Grid, the Detail Grid will not participate in the Cell Selection of the Master Grid.
